package com.t5.bo.enums;



import java.io.Serializable;

public enum ContactData implements Serializable {
  PHONE("dataPhone"), EMAIL("dataEmail", Type.EMAIL), ICQ("dataIcq", Group.IM), MSN("dataMsn", Group.IM), GTALK("dataGtalk", Group.IM),
  SKYPE("dataSkype", Group.IM), Date("dataDate", Type.DATE), ICO("dataIcon"), GENDER("dataGender", Type.SELECT), LINK("dataLink"), ADDRESS("dataAddress"), FACEBOOK("dataFacebook", Group.SOCIAL_NETWORK), VKONTAKTE("dataVkontakte", Group.SOCIAL_NETWORK),
  LINKEDIN("dataLinkedIn", Group.SOCIAL_NETWORK), OTHER("dataOther"), NAME("dataName");
  private String ico;
  private String name;
  private Type dataType = Type.TEXT;
  private Group group;

  public String getDescription() {
    switch (this){
      case PHONE: return "Mobile";
      case EMAIL: return "Personal";
    }
    return "";
  }

  public static enum Type {TEXT, DATE, NUMBER, EMAIL, SELECT}

  public static enum Group {
    IM("groupIM"), SOCIAL_NETWORK("groupSocialnetwork");
    private String name;

    Group(String name) {
      this.name = name;
    }

    public String getName() {
      return name;
    }
  }

  ContactData() {
  }

  ContactData(String name, Type type) {
    this.name = name;
    this.dataType = type;
  }

  ContactData(String name, Group group) {
    this.name = name;
    this.group = group;
  }

  ContactData(String name) {
    this.name = name;
    this.dataType = Type.TEXT;
  }

  public String getIco() {
    return ico;
  }

  public void setIco(String ico) {
    this.ico = ico;
  }

  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public Group getGroup() {
    return group;
  }

  public void setGroup(Group group) {
    this.group = group;
  }

  public Type getDataType() {
    return dataType;
  }
}